﻿@model GKS.TBMS.Portal.Models.User

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    
    <div class="form-horizontal">
        <h4>User</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.Id)

        <div class="form-group">
            @Html.LabelFor(model => model.FirstName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.FirstName, new { @id = "TxtFirstName" })
                @Html.ValidationMessageFor(model => model.FirstName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.MiddleName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.MiddleName)
                @Html.ValidationMessageFor(model => model.MiddleName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.LastName, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.LastName)
                @Html.ValidationMessageFor(model => model.LastName)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Username, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Username)
                @Html.ValidationMessageFor(model => model.Username)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Password, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Password)
                @Html.ValidationMessageFor(model => model.Password)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CreatedIn, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CreatedIn)
                @Html.ValidationMessageFor(model => model.CreatedIn)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.CreatedBy, "Created By", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("CreatedBy", String.Empty)
                @Html.ValidationMessageFor(model => model.CreatedBy)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.LastUpdate, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.LastUpdate)
                @Html.ValidationMessageFor(model => model.LastUpdate)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UpdatedBy, "Updated By", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("UpdatedBy", String.Empty)
                @Html.ValidationMessageFor(model => model.UpdatedBy)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Owner, "Owner", new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Owner", String.Empty)
                @Html.ValidationMessageFor(model => model.Owner)
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
